<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<title>Login</title>
		<link rel="stylesheet" href="css/jquery.mobile-1.3.1.css">
		<script src="js/jquery-1.9.1.min.js"></script>
		<script src="js/jquery.mobile-1.3.2.min.js"></script>
	</head>

	<body>
		<div data-role="page">
			<div data-role="header" data-position="fixed">
				<h1>登陆iChat</h1>
			</div>
			<div data-role="content">
			<form method="post" data-ajax="false">
				<div>
					<input type="text" name="name" id="nameInput" placeholder="请输入用户名">
					<button type="submit" id="submitBtn">登录</button>
				</div>
			</form>
		</div>
		</div>

		<script>
			var nameInput = document.getElementById('nameInput');
			var submit = document.getElementById('submit');
			nameInput.onkeyup = function (e) {
				if (nameInput.value.length > 0) {
					submitBtn.disabled = false;
				} else {
					submitBtn.disabled = true;
				}
			};
		</script>
	</body>
</html>